
<!DOCTYPE html>
<html lang="zh-Hans" class="loading">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>jenkins+docker自动化运维发布 - Luis Blog</title>
    <meta name="apple-mobile-web-app-capable" content="yes" />
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <meta name="google" content="notranslate" />
    <meta name="keywords" content="Luis,"> 
    <meta name="description" content="java开发工程师，喜欢代码，喜欢技术,面对微服务越来越繁杂的开发和运维，自动化部署的出现无异于雪中送炭，今天就开始一步一步搭建自动化部署平台，基于Docker。

本次搭建的前提；

Docker

安装Docker运行命令：
scri,"> 
    <meta name="author" content="winter chen"> 
    <link rel="alternative" href="atom.xml" title="Luis Blog" type="application/atom+xml"> 
    <link rel="icon" href="/img/favicon.png"> 
    
    
<link rel="stylesheet" href="/css/diaspora.css">

	<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({
              google_ad_client: "ca-pub-8691406134231910",
              enable_page_level_ads: true
         });
    </script>
    <script async custom-element="amp-auto-ads"
        src="https://cdn.ampproject.org/v0/amp-auto-ads-0.1.js">
    </script>
<meta name="generator" content="Hexo 4.2.0"></head>

<body class="loading">
    <span id="config-title" style="display:none">Luis Blog</span>
    <div id="loader"></div>
    <div id="single">
    <div id="top" style="display: block;">
    <div class="bar" style="width: 0;"></div>
    <a class="iconfont icon-home image-icon" href="javascript:;" data-url="https://blog.winterchen.com"></a>
    <div title="播放/暂停" class="iconfont icon-play"></div>
    <h3 class="subtitle">jenkins+docker自动化运维发布</h3>
    <div class="social">
        <div>
            <div class="share">
                <a title="获取二维码" class="iconfont icon-scan" href="javascript:;"></a>
            </div>
            <div id="qr"></div>
        </div>
    </div>
    <div class="scrollbar"></div>
</div>

    <div class="section">
        <div class="article">
    <div class='main'>
        <h1 class="title">jenkins+docker自动化运维发布</h1>
        <div class="stuff">
            <span>三月 14, 2020</span>
            
  <ul class="post-tags-list" itemprop="keywords"><li class="post-tags-list-item"><a class="post-tags-list-link" href="/tags/DevOps/" rel="tag">DevOps</a></li><li class="post-tags-list-item"><a class="post-tags-list-link" href="/tags/docker/" rel="tag">docker</a></li><li class="post-tags-list-item"><a class="post-tags-list-link" href="/tags/jenkins/" rel="tag">jenkins</a></li></ul>


        </div>
        <div class="content markdown">
            <p>面对微服务越来越繁杂的开发和运维，自动化部署的出现无异于雪中送炭，今天就开始一步一步搭建自动化部署平台，基于Docker。</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/master/blog/1586287-3f440db6467f6a69.png" alt="jenkins持续交付流程图"></p>
<p>本次搭建的前提；</p>
<ul>
<li>Docker</li>
</ul>
<h2 id="安装Docker"><a href="#安装Docker" class="headerlink" title="安装Docker"></a>安装Docker</h2><p>运行命令：</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br></pre></td><td class="code"><pre><span class="line">sudo yum remove docker \</span><br><span class="line">                  docker-client \</span><br><span class="line">                  docker-client-latest \</span><br><span class="line">                  docker-common \</span><br><span class="line">                  docker-latest \</span><br><span class="line">                  docker-latest-logrotate \</span><br><span class="line">                  docker-logrotate \</span><br><span class="line">                  docker-engine</span><br></pre></td></tr></table></figure>
<p>安装所需的软件包。 yum-utils提供了yum-config-manager实用程序，devicemapper存储驱动程序需要device-mapper-persistent-data和lvm2</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo yum install -y yum-utils \</span><br><span class="line">  device-mapper-persistent-data \</span><br><span class="line">  lvm2</span><br></pre></td></tr></table></figure>

<p>设置稳定的镜像仓库</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">sudo yum-config-manager \</span><br><span class="line">    --add-repo \</span><br><span class="line">    https://download.docker.com/linux/centos/docker-ce.repo</span><br></pre></td></tr></table></figure>
<p>安装最新版docker</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">sudo yum install docker-ce docker-ce-cli containerd.io</span><br></pre></td></tr></table></figure>

<h2 id="docker加速"><a href="#docker加速" class="headerlink" title="docker加速"></a>docker加速</h2><figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">vim /etc/docker/daemon.json</span><br></pre></td></tr></table></figure>
<p>如果不存在daemon.json文件则新建一个</p>
<p>daemon.json</p>
<figure class="highlight json"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">    <span class="attr">"registry-mirrors"</span>:[<span class="string">"https://docker.mirrors.ustc.edu.cn"</span>]</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>重启守护进程</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo systemctl daemon-reload</span><br><span class="line">sudo systemctl restart docker</span><br></pre></td></tr></table></figure>

<h3 id="docker常用命令"><a href="#docker常用命令" class="headerlink" title="docker常用命令"></a>docker常用命令</h3><figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 进入容器</span></span><br><span class="line">docker exec -it &lt;containerId&gt; /bin/bash</span><br><span class="line"><span class="meta">#</span><span class="bash"> 查看容器日志</span></span><br><span class="line">docker logs -f &lt;containerId&gt;</span><br></pre></td></tr></table></figure>

<h2 id="jenkins和docker私有仓库registry环境安装"><a href="#jenkins和docker私有仓库registry环境安装" class="headerlink" title="jenkins和docker私有仓库registry环境安装"></a>jenkins和docker私有仓库registry环境安装</h2><p>安装jenkins</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run --name devops-jenkins --user=root -p 8080:8080 -p 50000:50000 -v /opt/data/jenkins_home:/var/jenkins_home -d jenkins/jenkins:lts</span><br></pre></td></tr></table></figure>
<p>安装私有仓库</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker run --name devops-registry -p 5000:5000 -v /opt/devdata/registry:/var/lib/registry -d registry</span><br></pre></td></tr></table></figure>

<h2 id="jenkins-配置"><a href="#jenkins-配置" class="headerlink" title="jenkins 配置"></a>jenkins 配置</h2><h3 id="初始化jenkins及安装插件"><a href="#初始化jenkins及安装插件" class="headerlink" title="初始化jenkins及安装插件"></a>初始化jenkins及安装插件</h3><p>启动完jenkins后通过浏览器输入地址http://部署jenkins主机IP:端口</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/master/blog/20200314200743.png" alt=""></p>
<p>根据提示从输入administrator password 或者可以通过启动日志</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">docker logs devops-jenkins</span><br></pre></td></tr></table></figure>

<p>查看这个password 如：</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/master/blog/20200314200909.png" alt=""></p>
<p>选择安装插件方式，这里我是默认第一个</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/master/blog/20200314200947.png" alt=""></p>
<p>进入插件安装界面，连网等待插件安装</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/master/blog/20200314201017.png" alt=""></p>
<p>安装完插件后，进入创建管理员界面</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/master/blog/20200314201051.png" alt=""></p>
<p>输入完管理员账号后，点击continue as admin 进入管理界面点击系统管理-插件管理中安装docker构建插件和角色管理插件<br><img src="https://github.com/WinterChenS/imgrpo/blob/develop/blog/1586287-9f67e8fc09be2115%20(1).png" alt=""></p>
<p>安装docker构建插件，在可选插件中查找docker build step plugin<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314203517.png" alt=""></p>
<p>安装角色管理插件，在可选插件中查找Role-based Authorization Strategy<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314203553.png" alt=""></p>
<p>安装SSH插件，用于构建成功后执行远端服务器脚本从docker本地仓库获取镜像后发布新版本<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314203620.png" alt=""></p>
<p>安装 Email Extension Plugin 插件，配置自动发送邮件<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314203648.png" alt=""></p>
<h2 id="配置jenkins属性及相关权限"><a href="#配置jenkins属性及相关权限" class="headerlink" title="配置jenkins属性及相关权限"></a>配置jenkins属性及相关权限</h2><h3 id="jenkins属性"><a href="#jenkins属性" class="headerlink" title="jenkins属性"></a>jenkins属性</h3><p>点击系统管理-&gt;Global Tool Configuration-&gt;找到jdk点击新增按钮(自动安装请先到Oracle注册账号)</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314203733.png" alt=""></p>
<p>配置git<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314211249.png" alt=""></p>
<p>点击系统管理-&gt;Global Tool Configuration-&gt;找到maven点击新增按钮</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314203755.png" alt=""></p>
<p>点击系统管理-&gt;系统设置<br>配置SSH</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314203926.png" alt=""></p>
<p>配置docker</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204005.png" alt=""></p>
<p>设置docker主机可以被远程访问</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br></pre></td><td class="code"><pre><span class="line">vim /usr/lib/systemd/system/docker.service</span><br><span class="line">在ExecStart=/usr/bin/docker daemon 后追加 -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock</span><br><span class="line"></span><br><span class="line"><span class="meta">#</span><span class="bash">如：</span></span><br><span class="line">ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock</span><br></pre></td></tr></table></figure>
<p>重启docker</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">sudo systemctl daemon-reload</span><br><span class="line">sudo systemctl restart docker</span><br></pre></td></tr></table></figure>

<p>重新启动jenkins容器</p>
<figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br></pre></td><td class="code"><pre><span class="line"><span class="meta">#</span><span class="bash"> 查看所有的容器</span></span><br><span class="line">docker container ls -a</span><br><span class="line"><span class="meta">#</span><span class="bash"> 找到jenkins和私有仓库的containerId，启动</span></span><br><span class="line">docker container start &lt;container Id&gt;</span><br></pre></td></tr></table></figure>

<p>配置邮件</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204050.png" alt=""></p>
<h2 id="jenkins权限"><a href="#jenkins权限" class="headerlink" title="jenkins权限"></a>jenkins权限</h2><ol>
<li><p>选择系统管理-&gt;Configuration Global Security（全局安全设置）-&gt;进入选择启用安全：<br>TCP port for JNLP agents -&gt;禁用，访问控制-安全域-&gt;jenkins专有用户数据库，访问控制-授权策略-&gt;Role-Based Strategy 如：<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204232.png" alt=""></p>
</li>
<li><p>选择系统管理-&gt;Manage and Assign Roles-&gt;Manage Roles：</p>
</li>
</ol>
<ul>
<li><p>添加Global Roles(admin、member、ops、others)，<br>设置全局角色（全局角色可以对jenkins系统进行设置与项目的操作）<br>admin:对整个jenkins都可以进行操作<br>ops:可以对所有的job进行管理<br>other/member:只有读的权限</p>
</li>
<li><p>添加project Roles(dmp-manager、dmp-view、tsc-manager、tsc-view)并且给添加的角色分配如下权限</p>
</li>
</ul>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204349.png" alt=""></p>
<ul>
<li>注意：在添加project Roles时，如果想让不同的用户看到不同的job,必须设置Pattern,如上dmp_manager角色就只能查看以dmp开头的job,Pattern规则必须是“dmp.”，注意是以“.”结尾的匹配规则，tsc亦是如此。</li>
</ul>
<ol start="3">
<li><p>选择系统管理-&gt;管理用户:新建几个管理员用户如：dmpadmin、tscadmin<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204435.png" alt=""></p>
</li>
<li><p>选择系统管理-&gt;Manage and Assign Roles-&gt;Assign Relos:把第三步的用户加到user/group中并授于对应的角色权限 如：</p>
</li>
</ol>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204502.png" alt=""></p>
<h2 id="创建-编译-打包-上传docker镜像任务-执行远端脚本从私有仓库获取镜像发布新版本-发布完成发送邮件推送"><a href="#创建-编译-打包-上传docker镜像任务-执行远端脚本从私有仓库获取镜像发布新版本-发布完成发送邮件推送" class="headerlink" title="创建-编译-打包-上传docker镜像任务-执行远端脚本从私有仓库获取镜像发布新版本-发布完成发送邮件推送"></a>创建-编译-打包-上传docker镜像任务-执行远端脚本从私有仓库获取镜像发布新版本-发布完成发送邮件推送</h2><h3 id="新建任务"><a href="#新建任务" class="headerlink" title="新建任务"></a>新建任务</h3><p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204615.png" alt=""></p>
<h3 id="源码管理"><a href="#源码管理" class="headerlink" title="源码管理"></a>源码管理</h3><p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204729.png" alt=""><br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314204820.png" alt=""></p>
<h3 id="构建触发器"><a href="#构建触发器" class="headerlink" title="构建触发器"></a>构建触发器</h3><p>如果没有此项，请安装该插件 Generic Webhook Trigger<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314205034.png" alt=""></p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314205637.png" alt=""></p>
<h4 id="github创建webhook"><a href="#github创建webhook" class="headerlink" title="github创建webhook"></a>github创建webhook</h4><p>http://用户名:webToken@Jenkins服务器地址:端口/generic-webhook-trigger/invoke<br>如<a href="http://admin:dsfadfadsfaf@192.168.1.1:8080/generic-webhook-trigger/invoke" target="_blank" rel="noopener">http://admin:dsfadfadsfaf@192.168.1.1:8080/generic-webhook-trigger/invoke</a></p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314205142.png" alt=""><br>点击添加webhook<br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314205227.png" alt=""><br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200315114955.png" alt=""><br>图中的token和上面构建触发器中填写的token是一致的，如果都没有构建器中没有填写，那么这边可以不用添加</p>
<h2 id="构建"><a href="#构建" class="headerlink" title="构建"></a>构建</h2><p>1、maven 构建项目<br>2、构建docker镜像<br>3、推送docker镜像</p>
<h4 id="maven-构建镜像"><a href="#maven-构建镜像" class="headerlink" title="maven 构建镜像"></a>maven 构建镜像</h4><p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314210251.png" alt=""><br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314210359.png" alt=""></p>
<h4 id="构建和推送docker镜像"><a href="#构建和推送docker镜像" class="headerlink" title="构建和推送docker镜像"></a>构建和推送docker镜像</h4><p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314210526.png" alt=""></p>
<h4 id="SSH执行远端服务器脚本运行最新镜像"><a href="#SSH执行远端服务器脚本运行最新镜像" class="headerlink" title="SSH执行远端服务器脚本运行最新镜像"></a>SSH执行远端服务器脚本运行最新镜像</h4><p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314210742.png" alt=""></p>
<h2 id="构建后操作"><a href="#构建后操作" class="headerlink" title="构建后操作"></a>构建后操作</h2><h3 id="发送邮件推送"><a href="#发送邮件推送" class="headerlink" title="发送邮件推送"></a>发送邮件推送</h3><p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314210917.png" alt=""></p>
<h2 id="验证构建"><a href="#验证构建" class="headerlink" title="验证构建"></a>验证构建</h2><p>见证奇迹的时候到了</p>
<p>点击立即构建</p>
<p><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314211006.png" alt=""><br><img src="https://raw.githubusercontent.com/WinterChenS/imgrpo/develop/blog/20200314211041.png" alt=""></p>
<h2 id="my-site-run-sh"><a href="#my-site-run-sh" class="headerlink" title="my-site-run.sh"></a>my-site-run.sh</h2><figure class="highlight shell"><figcaption><span>script</span></figcaption><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br></pre></td><td class="code"><pre><span class="line">docker pull 118.25.36.41:5000/winterchen/my-site:1.0.0-RELEASE</span><br><span class="line"></span><br><span class="line">docker stop 118.25.36.41:5000/winterchen/my-site:1.0.0-RELEASE</span><br><span class="line"></span><br><span class="line">docker rm 118.25.36.41:5000/winterchen/my-site:1.0.0-RELEASE</span><br><span class="line"></span><br><span class="line">docker run 118.25.36.41:5000/winterchen/my-site:1.0.0-RELEASE</span><br></pre></td></tr></table></figure>














            <!--[if lt IE 9]><script>document.createElement('audio');</script><![endif]-->
            <audio id="audio" loop="1" preload="auto" controls="controls" data-autoplay="false">
                <source type="audio/mpeg" src="">
            </audio>
            
                <ul id="audio-list" style="display:none">
                    
                        
                            <li title='0' data-url='https://raw.githubusercontent.com/WinterChenS/imgrpo/master/mp3/%E6%96%B0%E8%A3%A4%E5%AD%90-%E7%94%9F%E6%B4%BB%E5%9B%A0%E4%BD%A0%E8%80%8C%E7%81%AB%E7%83%AD.mp3'></li>
                        
                    
                </ul>
            
        </div>
        
    <div id='gitalk-container' class="comment link"
		data-enable='false'
        data-ae='false'
        data-ci='77f2adc33e0112d086d7'
        data-cs='e926aa3a621556609b2c2b76d89320fa524e23cd'
        data-r='WinterChenS.github.io'
        data-o='WinterChenS'
        data-a='WinterChenS'
        data-d='false'
    >查看评论</div>


    </div>
    
</div>


    </div>
</div>
</body>


<script src="//lib.baomitu.com/jquery/1.8.3/jquery.min.js"></script>
<script src="/js/plugin.js"></script>
<script src="/js/typed.js"></script>
<script src="/js/diaspora.js"></script>


<link rel="stylesheet" href="/photoswipe/photoswipe.css">
<link rel="stylesheet" href="/photoswipe/default-skin/default-skin.css">


<script src="/photoswipe/photoswipe.min.js"></script>
<script src="/photoswipe/photoswipe-ui-default.min.js"></script>


<!-- Root element of PhotoSwipe. Must have class pswp. -->
<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
    <!-- Background of PhotoSwipe. 
         It's a separate element as animating opacity is faster than rgba(). -->
    <div class="pswp__bg"></div>
    <!-- Slides wrapper with overflow:hidden. -->
    <div class="pswp__scroll-wrap">
        <!-- Container that holds slides. 
            PhotoSwipe keeps only 3 of them in the DOM to save memory.
            Don't modify these 3 pswp__item elements, data is added later on. -->
        <div class="pswp__container">
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
            <div class="pswp__item"></div>
        </div>
        <!-- Default (PhotoSwipeUI_Default) interface on top of sliding area. Can be changed. -->
        <div class="pswp__ui pswp__ui--hidden">
            <div class="pswp__top-bar">
                <!--  Controls are self-explanatory. Order can be changed. -->
                <div class="pswp__counter"></div>
                <button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
                <button class="pswp__button pswp__button--share" title="Share"></button>
                <button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
                <button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
                <!-- Preloader demo http://codepen.io/dimsemenov/pen/yyBWoR -->
                <!-- element will get class pswp__preloader--active when preloader is running -->
                <div class="pswp__preloader">
                    <div class="pswp__preloader__icn">
                      <div class="pswp__preloader__cut">
                        <div class="pswp__preloader__donut"></div>
                      </div>
                    </div>
                </div>
            </div>
            <div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
                <div class="pswp__share-tooltip"></div> 
            </div>
            <button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
            </button>
            <button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
            </button>
            <div class="pswp__caption">
                <div class="pswp__caption__center"></div>
            </div>
        </div>
    </div>
</div>





<!-- Google Analytics -->
<script type="text/javascript">
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

  ga('create', 'G-30C04D6TMS', 'auto');
  ga('send', 'pageview');
</script>
<!-- End Google Analytics -->


</html>
